{include file="/index/top"}
<style>

    .banner {
        position: absolute;
        z-index: 20;
        width: 100%;
        text-align: center;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        height: 30%;
        margin: auto;
        padding-top: 320px;
    }

    .banner-text {
        font-family: Pecita;
        color: #ffffff;
        font-size: 70px;
    }

    .banner-text > p {
        line-height: 150px;
    }

    .left {
        float: left;
    }

    .right {
        float: right;
    }

</style>

<div>
    <img src="__static__/images/apply.jpg" class="img-responsive" alt="Responsive image" width="100%">

    <div style="">
        <div style="position: absolute;display: block;top: 0;width: 100%">
            {include file="/index/topnav"}
            <div class="banner" id="child">
                <div class="banner-text layui-anim layui-anim-scaleSpring">
                    <p>网 院 计 算 机 协 会</p>

                    <p>协 会 新 闻</p>

                    <h3>交流学术知识，传播创新理念，激发创新意识，弘扬创新精神</h3>

                </div>
            </div>
        </div>
    </div>

    <div class="news-details" style="margin-bottom: 30px" id="newsdetails">
        <div id="newscontent">

        </div>
    </div>
</div>
<script>
    var querystring = querystringParse(location.search);
    function querystringParse(str) {
        str = str.substr(1);
        var obj = {};
        str.split('&').forEach(function (item) {
            var objArr = item.split('=');
            obj[objArr[0]] = objArr[1];
        });
        return obj;
    }
    console.log(querystring.newsid);
    var app = new Vue({
        el: '#newsdetails',
        data: {
            baseUrl: "__static__",
            newsdata: []
        },
        methods:{
        },
        mounted:function(){
            var then = this;
            $.ajax({
                type: "post",
                url: "api/getNewsDetails",
                datatype: "json",
                async: false,
                data:JSON.stringify({"newsid":querystring.newsid}),
                contentType: "application/json",
                headers: __AUTH__,
                success: function (resp) {
                    then.newsdata = resp.data;
                    $("title").html(resp.data.title);
                    document.getElementById('newscontent').innerHTML = resp.data.content;
                    console.log(resp.data.title)
                }
            })
        }
    })

</script>
<div style="padding-top: 30px">
    {include file="/index/footer"}
</div>
